import "package:flutter/material.dart";

import "hello.dart";
import "build_layout.dart";
import "list_and_grid.dart";
import "listview_with_various_item.dart";
import "ephemeral_widget.dart";
import 'cart/login.dart';
import 'http_widget.dart';
import 'input.dart';

void main() {
  runApp(const MaterialApp(home: MyApp()));
}

class MyApp extends StatelessWidget {
  const MyApp({ super.key });

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Navigation")),
      body: Center(
          child: Column(
            children: [

              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const HelloWidget()),
                  );
                },
                child: const Text("Hello Flutter"),
              ),

              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const LayoutWidget()),
                  );
                },
                child: const Text("Build Layout"),
              ),
              
              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const ListAndGrid())
                  );
                }, 
                child: const Text("List And Grid")
              ),

              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const ListViewWithVariousItem())
                  );
                },
                child: const Text("ListView with various items")
              ),

              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const EphemeralWidget())
                  );
                },
                child: const Text("Ephemeral Widget")
              ),

              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const LoginWidget())
                  );
                },
                child: const Text("Cart")
              ),

              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const HttpWidget())
                  );
                },
                child: const Text("http")
              ),

              ElevatedButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => const InputWidget())
                  );
                },
                child: const Text("handle input")
              ),
            ],
          )
      ),
    );
  }
}